package com.yoomiito.app.ui.order.sureorder

import androidx.recyclerview.widget.RecyclerView
import android.widget.LinearLayout
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.yoomiito.app.R
import com.yoomiito.app.utils.DensityUtil

class JiaMaiCodeShowAdapter(data:List<String>?) :BaseQuickAdapter<String,BaseViewHolder>(R.layout.item_jiamai_code,data){
    override fun convert(helper: BaseViewHolder?, item: String?) {
//        val view = helper?.getView<LinearLayout>(R.id.itemJiaMaiView)
        val lp = helper?.itemView?.layoutParams as androidx.recyclerview.widget.RecyclerView.LayoutParams
        lp.leftMargin = DensityUtil.dp2px(12f)
        lp.rightMargin = DensityUtil.dp2px(12f)
        helper?.setText(R.id.jiaMaiCodeTv,item)
        helper?.addOnClickListener(R.id.copyJiaMaiCode)
    }
}